package com.mystudy.quartzspringbootdemo.config;

import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


/**
 * @author Thanks
 */
@Configuration
@MapperScan(basePackages = {"com.mystudy.quartzspringbootdemo.mapper.**"})
public class MybatisConfig {



    @Bean
    public PaginationInterceptor paginationInterceptor() {
        PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
        paginationInterceptor.setDbType(DbType.MYSQL);
        return paginationInterceptor;
    }

  /*  public static void main(String[] args) {
        Date date = new Date();
        String year = String.format("%tY", date);
        String month = String.format("%tm",date);
        System.out.println(year+month);
    }*/
}
